package BusinessLogic;

import Data.SaleTacticsData;
import Data.SaleTacticsDataOperator;
import Data.UserData;
import Data.permissionData;

import java.util.ArrayList;

import Data.GoodData;

public class MakeSaleTacticsModel implements IMakeSaleTacticsModel{
	
	SaleTacticsDataOperator so=new SaleTacticsDataOperator();
	private ArrayList<MakeSaleTacticsItem>List = new ArrayList<MakeSaleTacticsItem>();

	
	public ArrayList<MakeSaleTacticsItem> getList(){
		return List;
	}
	
	public void setAddList(ArrayList<MakeSaleTacticsItem> aList){
		List = aList;
	}
	
	@Override
	public boolean addSaleTactics(int id, double sp, String speS, String speE) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public SaleTacticsData getSaleTacticsInformation(int ID) {
		SaleTacticsData sdo=(SaleTacticsData)so.readDataByID(ID);
		return sdo;
	}

	@Override
	public String getSaleTacticsSpecialEndByID(int id) {
		String i;
		SaleTacticsData sd = (SaleTacticsData) so.readDataByID(id);
		i = sd.getSpecialEnd();
		return i;
	}

	@Override
	public double getSaleTacticsSpecialPriceByID(int id) {
		double i;
		SaleTacticsData sd = (SaleTacticsData) so.readDataByID(id);
		i = sd.getSpecialPrice();
		return i;
	}

	@Override
	public String getSaleTacticsSpecialStaretByID(int id) {
		String i;
		SaleTacticsData sd = (SaleTacticsData) so.readDataByID(id);
		i = sd.getSpecialStart();
		return i;
	}

	@Override
	public boolean removeSaleTactics(int id) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public String searchSaleTacticsInfomationByID(int ID) {
		String information;
		SaleTacticsData sdo = (SaleTacticsData) so.readDataByID(ID);
		information = sdo.getID() + "," + sdo.getSpecialPrice()+","+sdo.getSpecialStart()+","+sdo.getSpecialEnd();
		return information;
	}

	@Override
	public boolean startUpdate() {
		// TODO Auto-generated method stub
		return false;
	}

}
